package cn.itcast.dao;

import cn.itcast.jopo.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface StudentDao {
    @Select("select * from user")
    public List<Student> findAll();
    @Options(useGeneratedKeys =true,keyColumn ="id",keyProperty ="id")
    @Insert("insert into user values(#{},#{},#{})")
    public void addStudent(Student student);
    @Delete("delete from user where id=5")
    public void deleteStudent();
}
